#ifndef _ELEMENTS_CHECKBOX_H_
# define _ELEMENTS_CHECKBOX_H_

# include "config.h"
# include <string>
# include <SDL/SDL.h>
# include "UTILS\\Surface.h"
# include "UTILS\\Rect.h"
# include "Elements\\AButton.h"

NS_BEGIN(SDL)
	NS_BEGIN(ELEMENTS)

	class CheckBox : public AButton
	{
	private:
		static UTILS::Surface* IMG_RELEASED;
		static UTILS::Surface* IMG_HOVERED;
		static UTILS::Surface* IMG_PRESSED;
		static UTILS::Surface* IMG_CLICKED;
		static UTILS::Surface* IMG_DISABLED;
		static UTILS::Surface* IMG_CHECKED;
		bool m_checked;
		UTILS::Surface* m_imgChecked;

	public:
		CheckBox(std::wstring const& _text);
		CheckBox(CheckBox const& _checkBox);
		~CheckBox();

		CheckBox& operator=(CheckBox const& _checkBox);

		virtual void UpdateState();
		virtual bool Draw(SDL_Surface* _screen);
		virtual void SetPosition(Sint16 _x, Sint16 _y);
		virtual void SetPosition(UTILS::Rect const& _position);
		virtual void Move(Sint16 _offsetX, Sint16 _offsetY);
		virtual void Move(UTILS::Rect const& _offset);

		bool IsChecked() const;
		void Check(bool _value);
		virtual void SetText(std::wstring const& _text);
	};

	NS_END(ELEMENTS)
NS_END(SDL)

#endif // _ELEMENTS_CHECKBOX_H_
